package com.example.demo.task;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

/**
 * @author yuwc
 * @description 测试异步
 * @data 2019/5/17 0017下午 3:57
 */
@RunWith(SpringRunner.class)
@SpringBootTest
public class TaskTest {
    @Autowired
    private TestAsync testAsync;
    @Test
    public  void  test() throws InterruptedException {
        testAsync.service1();
        testAsync.service2();
    }

}
